<script setup lang="ts">
import { onMounted } from "vue";

onMounted(() => {
    const oParent = document.getElementById("my-loading")?.parentElement;
    oParent && !oParent.style.position && (oParent.style.position = "relative");
});
</script>

<template>
    <div id="my-loading">
        <p>加载中</p>
    </div>
</template>

<style scoped>
#my-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>
